package storage.file;

public class Block {
    private String filename;
    private int blknum;

    public Block(String filename, int blknum) {
        this.filename = filename;
        this.blknum = blknum;
    }

    public String getFileName() {
        return filename;
    }

    public int getBlkNum() {
        return blknum;
    }

    public boolean equals(Block blk) {
        boolean flag = false;
        if(filename.equals(blk.filename) && blknum == blk.blknum ) {
            flag = true;
        }
        return flag;
    }

    public String toString() {
        return filename+","+blknum;
    }

    public int hashCode() {
        return toString().hashCode();
    }
}
